package twitterdata;

	import java.io.File;
	 
	public class MoveFile2 
	{
	    public static void main(String[] args)
	    {	
	    	try{
	 
	    	   File afile =new File("C:/Afolder/Afile.txt");
	           String name = afile.getName();
	           System.out.println(name);
	           
	    	   if(afile.renameTo(new File("C:/Bfolder/" + afile.getName()))){
	    		System.out.println("File is moved successful!");
	    	   }else{
	    		System.out.println("File is failed to move!");
	    	   }
	 
	    	}catch(Exception e){
	    		e.printStackTrace();
	    	}
	    }
	}

